import React  from 'react';
import {connect} from 'react-redux';
import * as actions from '@/store/actions/middleware';

class Middleware extends React.Component{
    render(){
        return(
            <div>
                <h6>middleware</h6>
                <h6>{this.props.age}</h6>
                <button onClick={()=>{this.props.thunk_increment(2)}}>thunk+1</button>
                <button onClick={()=>{this.props.promise_increment()}}>promise+1</button>
            </div>
        )
    }
}

export default connect(
    state=>state.test,
    actions

)(Middleware);